<template>
  <div id="app">
    <Header></Header>
    <router-view></router-view>
    <Footer v-show="!$route.meta.isHidden"></Footer>
  </div>
</template>

<script>

  import Footer from '@/components/Footer/index.vue'
  import Header from '@/components/Header/index.vue'
  export default {
    name: 'App',
    components: {
      Header,
      Footer,
    },
    mounted() {
      // 在App中发起请求 
      // 优化发请求  home 和 search 切换时 不会重新发起请求
      this.$store.dispatch('home/getCategoryList')
    },
    
  }
</script>

<style>

</style>
